<!--  -->
<template>
  <div>
    <tab-bar v-show="isShow" style="background-color: #fff;">
      <tab-bar-item link="/home" activeColor="#FF5777">
        <img slot="item-img" src="~assets/img/tabbar/home.svg" />
        <img slot="item-img-active" src="~assets/img/tabbar/home_active.svg" />
        <span slot="item-text">首页</span>
      </tab-bar-item>
      <tab-bar-item link="/category" activeColor="#FF5777">
        <img slot="item-img" src="~assets/img/tabbar/category.svg" />
        <img
          slot="item-img-active"
          src="~assets/img/tabbar/category_active.svg"
        />
        <span slot="item-text">分类</span>
      </tab-bar-item>
      <tab-bar-item link="/shopcart" activeColor="#FF5777">
        <img slot="item-img" src="~assets/img/tabbar/shopcart.svg" />
        <img
          slot="item-img-active"
          src="~assets/img/tabbar/shopcart_active.svg"
        />
        <span slot="item-text">购物车</span>
      </tab-bar-item>
      <tab-bar-item link="/profile" activeColor="#FF5777">
        <img slot="item-img" src="~assets/img/tabbar/profile.svg" />
        <img
          slot="item-img-active"
          src="~assets/img/tabbar/profile_active.svg"
        />
        <span slot="item-text">我的</span>
      </tab-bar-item>
    </tab-bar>
  </div>
</template>

<script>
import TabBar from "components/common/tabbar/TabBar";
import TabBarItem from "components/common/tabbar/TabBarItem";

export default {
  name: "",
  data() {
    return {};
  },
  computed: {
    isShow() {
      let path = this.$route.path;
      return (
        path == "/home" ||
        path == "/shopcart" ||
        path == "/category" ||
        path == "/profile"
      );
    }
  },
  components: {
    TabBar,
    TabBarItem
  }
};
</script>

<style scoped></style>
